#include <arpa/inet.h>
#include <stdbool.h>

enum ACTION
{
    ACCEPT = 1,
    DENY
};

struct SOUR_FILTER
{
    struct in_addr ip;
    int mask;
    int port
};

struct DEST_FILTER
{
    struct in_addr ip;
    int mask;
    int port;
};

struct FILTER
{
    enum ACTION action;
    struct SOUR_FILTER sour_filter;
    struct DEST_FILTER dest_filter;
    struct FILTER *next
};

int read_line(char *path, struct FILTER *p_filter);
bool pass_with_filter(struct FILTER *p_filter, char *packet);